import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import Dashboard from '@/views/book/index.vue'
import Detail from '@/views/book/detail.vue'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/', name: 'Dashboard', component: Dashboard, meta: { title: "HomePage" },
        children: [
        ]
    },
    { path: '/detail', name: 'Detail', component: Detail, meta: { title: "Edit book's detail", noRedirectLink: true }, },
    { path: '/create', name: 'Create', component: Detail, meta: { title: "Create a new book"}, }

]
const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router